utils.js ➔ ... ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
dl 0
loc 5
nop 0
rs 10
1
import { fieldStringToArray } from '../utils';
2
3
describe('fieldStringToArray', () => {
4
	describe('output emtpy array if the input is', () => {
5
		it('emtpy string', () => {
6
			const fieldString = '';
7
			const result = fieldStringToArray(fieldString);
8
			expect(result).toEqual([]);
9
		});
10
11
		it('undefined', () => {
12
			const fieldString = undefined;
0 ignored issues
show
Unused Code Comprehensibility introduced by
The assignment of undefined is not necessary as fieldString is implicitly marked as undefined by the declaration.
Loading history...
13
			const result = fieldStringToArray(fieldString);
14
			expect(result).toEqual([]);
15
		});
16
	});
17
});
18